#pragma once
#ifndef _G_INPUT_DEVICE_MOUSE_H_
#define _G_INPUT_DEVICE_MOUSE_H_

#include "GInput.h"
#include "GVector3.h"
#include "GInputDevice.h"
#include "GInputDefinitions.h"

namespace GEngine
{

	class GMouseState
	{
	public:
		GInt32				DiffX, DiffY, DiffZ;
		bool				SemanticStates[G_MS_COUNT];

							GMouseState();
							~GMouseState();

		void				Reset();

		const GMouseState&	operator = (const GMouseState& Other);
	};

	class GModule;

	class GInputDeviceMouse : public GInputDevice
	{
	protected:
		GMouseState			CurrentState;
		GMouseState			PreviousState;
		
							GInputDeviceMouse(GModule* Owner, void* DeviceHandle);
		virtual				~GInputDeviceMouse();

		void				AdvanceState();

	public:
		virtual GUInt32		GetType() const OVERRIDE;
		virtual const char*	GetName() const OVERRIDE;

		virtual void		Reset() OVERRIDE;
		virtual bool		Update() OVERRIDE;

		GMath::GVector3		GetDifference() const;
		
		virtual bool		CheckInput(const GInput* Input) const OVERRIDE;

		static const char*	GetSemanticName(GMouseSemantics Semantic);

	};
	
}

#endif